//
// Decompiled by Jadx - 494ms
//
package gf;

import android.annotation.SuppressLint;
import android.database.Cursor;
import android.text.TextUtils;
import fn.j;
import fn.x;
import fn.y;
import fo.c;
import java.util.HashMap;
import java.util.List;
import me.plusne.common.Json.JsonHookStatic;
import o.a;
import org.luckypray.dexkit.query.matchers.ClassMatcher;
import org.luckypray.dexkit.query.matchers.MethodMatcher;
import org.luckypray.dexkit.result.MethodData;

@a("WX")
public final class b extends x {
    public static Object cp = null;
    public static String cq = null;
    public static String cr = null;
    public static String cs = null;
    public static String ct = "";
    public final HashMap<Object, String> cu = new HashMap<>();

    @SuppressLint({"Range"})
    public static String cv() {
        JsonHookStatic jsonHookStatic = y.by;
        if (jsonHookStatic.getEnMicroMsg() != null && TextUtils.isEmpty(ct)) {
            Cursor cursor = (Cursor) j.ab(jsonHookStatic.getEnMicroMsg(), "rawQuery", new Object[]{"select * from userinfo where id = 2", null});
            if (cursor != null) {
                cursor.moveToFirst();
                ct = cursor.getString(cursor.getColumnIndex("value"));
                cursor.close();
            }
            return ct;
        }
        return ct;
    }

    public final void a() {
        if (y.by.isLoadAllUserData()) {
            cr = fo.b.e("recentForwardedField");
            MethodData t = c.t(MethodMatcher.create().usingStrings(new String[]{"order by rconversation.username like \"%@chatroom\" asc"}).paramCount(5));
            String className = t.getClassName();
            String methodName = t.getMethodName();
            Class cls = Integer.TYPE;
            j.bd(className, methodName, new Object[]{cls, List.class, String.class, Boolean.TYPE, String.class, new a()});
            c.n(ClassMatcher.create().usingStrings(new String[]{"MicroMsg.Contact", "gh_9639b5a92773"})).getName();
            j.ay("com.tencent.mm.ui.contact.address.AddressLiveList", new b());
            MethodData t2 = c.t(MethodMatcher.create().usingStrings(new String[]{"select count(username) from rcontact where type & 1 !=0 and type & 32 =0 and type & 8 =0 and verifyFlag & 8 = 0 "}).paramCount(2));
            j.bd(t2.getClassName(), t2.getMethodName(), new Object[]{String[].class, String[].class, new c()});
            MethodData t3 = c.t(MethodMatcher.create().usingStrings(new String[]{"sql is null ", "DB IS CLOSED ! {%s}"}).paramCount(3));
            j.bd(t3.getClassName(), t3.getMethodName(), new Object[]{String.class, String[].class, cls, new d()});
            MethodData t4 = c.t(MethodMatcher.create().declaredClass("com.tencent.mm.view.recyclerview.WxRecyclerAdapter").returnType(cls).paramCount(0));
            String name = c.n(ClassMatcher.create().usingStrings(new String[]{"MicroMsg.Mvvm.MvvmRecyclerAdapter"})).getName();
            String e = fo.b.e("recentForwardedClass");
            cs = e;
            if (TextUtils.isEmpty(e)) {
                cs = c.t(MethodMatcher.create().usingEqStrings(new String[]{"contactUserName", "displayNickName"}).usingNumbers(new Number[]{4, 8})).getClassName();
            }
            j.bd(y.cj("WxRecyclerAdapter"), t4.getMethodName(), new Object[]{new e(this, name)});
        }
    }
}
